#ifndef GAME1_H
#define GAME1_H

#include "ui.h"



#define  hong    0x00ff0000
#define  cheng   0x00ff7f00
#define  huang   0x00ffff00
#define  lv      0x0000ff00
#define  qing    0x0000ffff
#define  lan     0x000000ff
#define  zi      0x00ff00ff
#define  bai     0x00ffffff
#define  hei     0x00000000

//最大方块数
#define  MAX_BLK   10
//方块宽高
#define  BLK_LEN   115
//胜利所需方块点击数
#define  WIN_BLK   100


extern int game_set ;

//方块边框宽度，内部宽度
extern int out_width;
extern int in_width;

struct block_data 
{
	int x;
	int y;
	int color;
}block[4][7];

extern int block_speed;

//方块计数
extern int block_cnt;
//失败判断
extern int block_fail;

extern lv_timer_t *block_move_timer ;
extern lv_timer_t *game_check_timer ;


static void block_click_event(lv_event_t *e);
void create_game_ui(void);
void block_move_cb(lv_timer_t *timer);
void game_check_cb(lv_timer_t *timer);
void game_over_ui(void);


#endif


